package com.ldx.java_chatroom.service;

import com.ldx.java_chatroom.mapper.UserMapper;
import com.ldx.java_chatroom.model.User;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;

@Service
public class UserService {
    @Resource
    UserMapper userMapper;

    public User login(String username) {
        return userMapper.selectByName(username);
    }

    public int insert(User user) {
        return userMapper.insert(user);
    }
}
